<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jQuery1.4.1.js"></script>
    <script src="./json/map.json"></script>
</head>

<body>

    <script>
        //usage:
        var json = [
            { "Category: All categories": "Bahamas", "field2": "100" },
            { "Category: All categories": "Slovenia", "field2": "60" },
            { "Category: All categories": "Nigeria", "field2": "52" },
            { "Category: All categories": "Namibia", "field2": "50" },
            { "Category: All categories": "Botswana", "field2": "" },
            { "Category: All categories": "Curaçao", "field2": "" },
            { "Category: All categories": "Cuba", "field2": "30" },
            { "Category: All categories": "Benin", "field2": "" },
            { "Category: All categories": "Turkey", "field2": "27" },
            { "Category: All categories": "Ghana", "field2": "25" },
            { "Category: All categories": "Pakistan", "field2": "23" },
            { "Category: All categories": "Togo", "field2": "" },
            { "Category: All categories": "St. Helena", "field2": "20" },
            { "Category: All categories": "Cyprus", "field2": "20" },
            { "Category: All categories": "Cayman Islands", "field2": "" },
            { "Category: All categories": "Venezuela", "field2": "18" },
            { "Category: All categories": "Singapore", "field2": "18" },
            { "Category: All categories": "Cameroon", "field2": "" },
            { "Category: All categories": "Bermuda", "field2": "" },
            { "Category: All categories": "China", "field2": "16" },
            { "Category: All categories": "Burundi", "field2": "" },
            { "Category: All categories": "Liechtenstein", "field2": "" },
            { "Category: All categories": "Gibraltar", "field2": "" },
            { "Category: All categories": "Kosovo", "field2": "" },
            { "Category: All categories": "Albania", "field2": "" },
            { "Category: All categories": "Turks & Caicos Islands", "field2": "" },
            { "Category: All categories": "Czechia", "field2": "13" },
            { "Category: All categories": "Georgia", "field2": "13" },
            { "Category: All categories": "Australia", "field2": "13" },
            { "Category: All categories": "Philippines", "field2": "13" },
            { "Category: All categories": "Maldives", "field2": "" },
            { "Category: All categories": "Madagascar", "field2": "" },
            { "Category: All categories": "Canada", "field2": "13" },
            { "Category: All categories": "Aruba", "field2": "" },
            { "Category: All categories": "Estonia", "field2": "" },
            { "Category: All categories": "South Africa", "field2": "11" },
            { "Category: All categories": "Lesotho", "field2": "" },
            { "Category: All categories": "United Arab Emirates", "field2": "11" },
            { "Category: All categories": "Malta", "field2": "" },
            { "Category: All categories": "North Macedonia", "field2": "" },
            { "Category: All categories": "Netherlands", "field2": "11" },
            { "Category: All categories": "St. Barthélemy", "field2": "" }
            ,
            { "Category: All categories": "Switzerland", "field2": "10" },
            { "Category: All categories": "St. Martin", "field2": "" },
            { "Category: All categories": "Mongolia", "field2": "" },
            { "Category: All categories": "Iceland", "field2": "" },
            { "Category: All categories": "Bangladesh", "field2": "10" },
            { "Category: All categories": "Faroe Islands", "field2": "" },
            { "Category: All categories": "Andorra", "field2": "" },
            { "Category: All categories": "Isle of Man", "field2": "" },
            { "Category: All categories": "Lithuania", "field2": "9" },
            { "Category: All categories": "Brunei", "field2": "" },
            { "Category: All categories": "Lebanon", "field2": "9" },
            { "Category: All categories": "New Zealand", "field2": "9" },
            { "Category: All categories": "Sri Lanka", "field2": "9" },
            { "Category: All categories": "Hong Kong", "field2": "9" },
            { "Category: All categories": "Rwanda", "field2": "" },
            { "Category: All categories": "Laos", "field2": "" },
            { "Category: All categories": "Luxembourg", "field2": "" },
            { "Category: All categories": "Kenya", "field2": "9" },
            { "Category: All categories": "Burkina Faso", "field2": "" },
            { "Category: All categories": "Israel", "field2": "9" },
            { "Category: All categories": "Sint Maarten", "field2": "" },
            { "Category: All categories": "Caribbean Netherlands", "field2": "" },
            { "Category: All categories": "Antigua & Barbuda", "field2": "" },
            { "Category: All categories": "Austria", "field2": "8" },
            { "Category: All categories": "Trinidad & Tobago", "field2": "" },
            { "Category: All categories": "Bulgaria", "field2": "8" },
            { "Category: All categories": "Zimbabwe", "field2": "" },
            { "Category: All categories": "Latvia", "field2": "" },
            { "Category: All categories": "Slovakia", "field2": "8" },
            { "Category: All categories": "San Marino", "field2": "" },
            { "Category: All categories": "Croatia", "field2": "8" },
            { "Category: All categories": "Grenada", "field2": "" },
            { "Category: All categories": "Åland Islands", "field2": "" }
            ,
            { "Category: All categories": "Mayotte", "field2": "" },
            { "Category: All categories": "Norway", "field2": "8" },
            { "Category: All categories": "Serbia", "field2": "7" },
            { "Category: All categories": "Eswatini", "field2": "" },
            { "Category: All categories": "Belgium", "field2": "7" },
            { "Category: All categories": "Bahrain", "field2": "" },
            { "Category: All categories": "Poland", "field2": "7" },
            { "Category: All categories": "Côte d’Ivoire", "field2": "" }
            ,
            { "Category: All categories": "Colombia", "field2": "7" },
            { "Category: All categories": "Bhutan", "field2": "" },
            { "Category: All categories": "Argentina", "field2": "7" },
            { "Category: All categories": "Malaysia", "field2": "7" },
            { "Category: All categories": "United Kingdom", "field2": "7" },
            { "Category: All categories": "Costa Rica", "field2": "7" },
            { "Category: All categories": "Ireland", "field2": "6" },
            { "Category: All categories": "Macao", "field2": "" },
            { "Category: All categories": "Nepal", "field2": "" },
            { "Category: All categories": "Hungary", "field2": "6" },
            { "Category: All categories": "Qatar", "field2": "" },
            { "Category: All categories": "United States", "field2": "6" },
            { "Category: All categories": "Morocco", "field2": "6" },
            { "Category: All categories": "Romania", "field2": "6" },
            { "Category: All categories": "India", "field2": "6" },
            { "Category: All categories": "Uganda", "field2": "" },
            { "Category: All categories": "Sweden", "field2": "6" },
            { "Category: All categories": "Portugal", "field2": "6" },
            { "Category: All categories": "Afghanistan", "field2": "" },
            { "Category: All categories": "Germany", "field2": "6" },
            { "Category: All categories": "Congo - Brazzaville", "field2": "" },
            { "Category: All categories": "Thailand", "field2": "6" },
            { "Category: All categories": "Jersey", "field2": "" },
            { "Category: All categories": "Moldova", "field2": "" },
            { "Category: All categories": "Mauritius", "field2": "" },
            { "Category: All categories": "Spain", "field2": "5" },
            { "Category: All categories": "Angola", "field2": "" },
            { "Category: All categories": "Ethiopia", "field2": "" },
            { "Category: All categories": "Bosnia & Herzegovina", "field2": "" },
            { "Category: All categories": "Barbados", "field2": "" },
            { "Category: All categories": "Cambodia", "field2": "" },
            { "Category: All categories": "Equatorial Guinea", "field2": "" },
            { "Category: All categories": "Montenegro", "field2": "" },
            { "Category: All categories": "Tunisia", "field2": "" },
            { "Category: All categories": "Armenia", "field2": "" },
            { "Category: All categories": "Jamaica", "field2": "" },
            { "Category: All categories": "Papua New Guinea", "field2": "" },
            { "Category: All categories": "Indonesia", "field2": "5" },
            { "Category: All categories": "St. Vincent & Grenadines", "field2": "" },
            { "Category: All categories": "Guyana", "field2": "" },
            { "Category: All categories": "Haiti", "field2": "" },
            { "Category: All categories": "Gabon", "field2": "" },
            { "Category: All categories": "Western Sahara", "field2": "" },
            { "Category: All categories": "Finland", "field2": "5" },
            { "Category: All categories": "Belize", "field2": "" },
            { "Category: All categories": "Dominican Republic", "field2": "5" },
            { "Category: All categories": "French Polynesia", "field2": "" },
            { "Category: All categories": "Panama", "field2": "" },
            { "Category: All categories": "Congo - Kinshasa", "field2": "" },
            { "Category: All categories": "Kuwait", "field2": "" },
            { "Category: All categories": "Turkmenistan", "field2": "" },
            { "Category: All categories": "Tanzania", "field2": "" },
            { "Category: All categories": "Suriname", "field2": "" },
            { "Category: All categories": "Niger", "field2": "" },
            { "Category: All categories": "Ukraine", "field2": "4" },
            { "Category: All categories": "Russia", "field2": "4" },
            { "Category: All categories": "Mali", "field2": "" },
            { "Category: All categories": "St. Kitts & Nevis", "field2": "" },
            { "Category: All categories": "Brazil", "field2": "4" },
            { "Category: All categories": "Guadeloupe", "field2": "" },
            { "Category: All categories": "Myanmar (Burma)", "field2": "" },
            { "Category: All categories": "Uruguay", "field2": "" },
            { "Category: All categories": "Dominica", "field2": "" },
            { "Category: All categories": "Vietnam", "field2": "4" },
            { "Category: All categories": "Mauritania", "field2": "" },
            { "Category: All categories": "Cape Verde", "field2": "" },
            { "Category: All categories": "France", "field2": "4" },
            { "Category: All categories": "El Salvador", "field2": "" },
            { "Category: All categories": "Denmark", "field2": "3" },
            { "Category: All categories": "Algeria", "field2": "3" },
            { "Category: All categories": "Guernsey", "field2": "" },
            { "Category: All categories": "Chile", "field2": "3" },
            { "Category: All categories": "Azerbaijan", "field2": "" },
            { "Category: All categories": "Peru", "field2": "3" },
            { "Category: All categories": "Greenland", "field2": "" },
            { "Category: All categories": "Guam", "field2": "" },
            { "Category: All categories": "Oman", "field2": "" },
            { "Category: All categories": "U.S. Virgin Islands", "field2": "" },
            { "Category: All categories": "Gambia", "field2": "" },
            { "Category: All categories": "Greece", "field2": "3" },
            { "Category: All categories": "Iran", "field2": "3" },
            { "Category: All categories": "South Korea", "field2": "3" },
            { "Category: All categories": "Martinique", "field2": "" },
            { "Category: All categories": "Ecuador", "field2": "3" },
            { "Category: All categories": "Italy", "field2": "3" },
            { "Category: All categories": "Palestine", "field2": "" },
            { "Category: All categories": "Egypt", "field2": "3" },
            { "Category: All categories": "Senegal", "field2": "" },
            { "Category: All categories": "Malawi", "field2": "" },
            { "Category: All categories": "Puerto Rico", "field2": "" },
            { "Category: All categories": "Saudi Arabia", "field2": "3" },
            { "Category: All categories": "Jordan", "field2": "" },
            { "Category: All categories": "St. Lucia", "field2": "" },
            { "Category: All categories": "Taiwan", "field2": "3" },
            { "Category: All categories": "Somalia", "field2": "" },
            { "Category: All categories": "Djibouti", "field2": "" },
            { "Category: All categories": "Zambia", "field2": "" },
            { "Category: All categories": "Belarus", "field2": "" },
            { "Category: All categories": "Mozambique", "field2": "" },
            { "Category: All categories": "Réunion", "field2": "" }
            ,
            { "Category: All categories": "French Guiana", "field2": "" },
            { "Category: All categories": "Paraguay", "field2": "" },
            { "Category: All categories": "Uzbekistan", "field2": "" },
            { "Category: All categories": "Sierra Leone", "field2": "" },
            { "Category: All categories": "Mexico", "field2": "2" },
            { "Category: All categories": "Syria", "field2": "" },
            { "Category: All categories": "Fiji", "field2": "" },
            { "Category: All categories": "New Caledonia", "field2": "" },
            { "Category: All categories": "Bolivia", "field2": "" },
            { "Category: All categories": "Libya", "field2": "" },
            { "Category: All categories": "Nicaragua", "field2": "" },
            { "Category: All categories": "Tajikistan", "field2": "" },
            { "Category: All categories": "Kyrgyzstan", "field2": "" },
            { "Category: All categories": "Iraq", "field2": "" },
            { "Category: All categories": "Sudan", "field2": "" },
            { "Category: All categories": "Kazakhstan", "field2": "" },
            { "Category: All categories": "Japan", "field2": "1" },
            { "Category: All categories": "Guatemala", "field2": "" },
            { "Category: All categories": "Honduras", "field2": "" },
            { "Category: All categories": "Guinea", "field2": "" },
            { "Category: All categories": "Yemen", "field2": "" },
            { "Category: All categories": "Vanuatu", "field2": "" },
            { "Category: All categories": "Cook Islands", "field2": "" },
            { "Category: All categories": "Kiribati", "field2": "" },
            { "Category: All categories": "São Tomé & Príncipe", "field2": "" }
            ,
            { "Category: All categories": "Guinea-Bissau", "field2": "" },
            { "Category: All categories": "Chad", "field2": "" },
            { "Category: All categories": "Samoa", "field2": "" },
            { "Category: All categories": "Liberia", "field2": "" },
            { "Category: All categories": "South Sudan", "field2": "" },
            { "Category: All categories": "Anguilla", "field2": "" },
            { "Category: All categories": "American Samoa", "field2": "" },
            { "Category: All categories": "Antarctica", "field2": "" },
            { "Category: All categories": "French Southern Territories", "field2": "" },
            { "Category: All categories": "Bouvet Island", "field2": "" },
            { "Category: All categories": "Central African Republic", "field2": "" },
            { "Category: All categories": "Cocos (Keeling) Islands", "field2": "" },
            { "Category: All categories": "Comoros", "field2": "" },
            { "Category: All categories": "Christmas Island", "field2": "" },
            { "Category: All categories": "Eritrea", "field2": "" },
            { "Category: All categories": "Falkland Islands (Islas Malvinas)", "field2": "" },
            { "Category: All categories": "Micronesia", "field2": "" },
            { "Category: All categories": "Heard & McDonald Islands", "field2": "" },
            { "Category: All categories": "British Indian Ocean Territory", "field2": "" },
            { "Category: All categories": "Monaco", "field2": "" },
            { "Category: All categories": "Marshall Islands", "field2": "" },
            { "Category: All categories": "Northern Mariana Islands", "field2": "" },
            { "Category: All categories": "Montserrat", "field2": "" },
            { "Category: All categories": "Norfolk Island", "field2": "" },
            { "Category: All categories": "Niue", "field2": "" },
            { "Category: All categories": "Nauru", "field2": "" },
            { "Category: All categories": "Pitcairn Islands", "field2": "" },
            { "Category: All categories": "Palau", "field2": "" },
            { "Category: All categories": "North Korea", "field2": "" },
            { "Category: All categories": "South Georgia & South Sandwich Islands", "field2": "" },
            { "Category: All categories": "Svalbard & Jan Mayen", "field2": "" },
            { "Category: All categories": "Solomon Islands", "field2": "" },
            { "Category: All categories": "St. Pierre & Miquelon", "field2": "" },
            { "Category: All categories": "Seychelles", "field2": "" },
            { "Category: All categories": "Tokelau", "field2": "" },
            { "Category: All categories": "Timor-Leste", "field2": "" },
            { "Category: All categories": "Tonga", "field2": "" },
            { "Category: All categories": "Tuvalu", "field2": "" },
            { "Category: All categories": "U.S. Outlying Islands", "field2": "" },
            { "Category: All categories": "Vatican City", "field2": "" },
            { "Category: All categories": "British Virgin Islands", "field2": "" },
            { "Category: All categories": "Wallis & Futuna", "field2": "" }
        ]
        // var str = JSON.stringify(json)
        // console.log(str);
        // console.log(json[1].field2);
        var country =[];
        var value =[];
        var all = [];

        var count = -1;
        for(var i in json){
            if(json[i].field2!=''){
            count++;
            value[count]=json[i].field2;
            country[count]=json[i]['Category: All categories'];
            var obj = new Object();
            all[count] = obj;
            all[count].name = json[i]['Category: All categories'];
            all[count].value=json[i].field2;
            }
        }
        
         console.log(all);
    </script>
</body>

</html>